//
//  JFBOrderListDataSource.h
//  ios-supplier
//
//  Created by feynmanyuan on 15/4/15.
//  Copyright (c) 2015年 feynmanyuan. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface JFBOrderDS : NSObject
//订单类型 undealer(未处理)  deliveries(配送中)  complete(完成)  refuse(拒绝)
@property (nonatomic, strong) NSString *orderType;

@property (nonatomic, assign) NSInteger ID;
//订单编号
@property (nonatomic, strong) NSString *orderCode;

//支付方式
@property (nonatomic, strong) NSString *payment;
//支付方式的原始值
@property (nonatomic, assign) NSUInteger paymentOrigin;
//共xxx件商品
@property (nonatomic, assign) NSUInteger totalCount;
//订单总价
@property (nonatomic, strong) NSDecimalNumber *money;
//原始价格
@property (nonatomic, strong) NSDecimalNumber *originMoney;
//优惠价格
@property (nonatomic, strong) NSDecimalNumber *promotionMoney;
//运费
@property (nonatomic, strong) NSDecimalNumber *carriageMoney;
//用户名称
@property (nonatomic, strong) NSString *userName;
//用户手机
@property (nonatomic, strong) NSString *userMobile;
//收货地址
@property (nonatomic, strong) NSString *address;
//要求送达时间
@property (nonatomic, strong) NSString *requireTime;
//下单时间
@property (nonatomic, strong) NSString *createAt;
@property (nonatomic, strong) NSString *updateAt;
//商品列表
@property (nonatomic, strong) NSMutableArray *merchandiseList;
//备注
@property (nonatomic, strong) NSString *remark;
//礼金卡
@property (nonatomic,strong) NSDecimalNumber *balance_amount;

//订单状态（未处理，配送中，完成，拒单）［以下根据订单的不同状态冗余不同的值］
@property (nonatomic, assign) NSUInteger orderState;
//========================配送中===========================
//配送员姓名
@property (nonatomic, strong) NSString *staff;
//配送员电话
@property (nonatomic, strong) NSString *staffMobile;

//========================完成==========================
//订单完成时间
@property (nonatomic, strong) NSString *completeAt;

//========================拒单===========================


- (instancetype)initWithAttributes:(NSDictionary *)attributes;

+ (NSURLSessionDataTask *)loadOrderList:(void (^)(NSArray *orders, NSError *error))block orderType:(NSUInteger)orderType pager:(JFBPager*)pager;
//+ (NSURLSessionDataTask *) getOrderDetail:(void (^)(JFBOrderDS *order, NSError *error))block orderID:(NSUInteger)orderID;
//确认配送
+ (NSURLSessionDataTask *)acceptStaff:(void (^)(BOOL isSuccess, JFBOrderDS *order, NSError *error))block orderID:(NSUInteger)orderID staffID:(NSUInteger)staffID;

@end
